package cn.lizemin.command.version1.entity;

/**
 * @author lzm
 * @version 1.0
 * @description: 开关类
 * @date 2022/5/12 9:44
 */
public class Switcher {

    private Command command;

//    设置指令
    public void setCommand(Command command) {
        this.command = command;
    }

    //按钮触发
    public void buttonPush() {
        System.out.println("按下按钮...");
        command.exe();
    }

    //按钮触发
    public void buttonPop() {
        System.out.println("弹起按钮...");
        command.unexe();
    }

}
